home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 40
/
Freelog040.iso
/
Bas
/
Internet
/
Selida
/
setup.exe
/
{app}
/
Templates
/
JavaScript sample
< prev
next >
Wrap
Text File
|
2002-10-08
|
2KB
|
64 lines
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>JavaScript</title>
<script language="javascript">
<!--
function Button1_onclick() {
document.bgColor = '#FF0000';
}
function Button2_onclick() {
document.bgColor = '#00FF00';
}
function Button3_onclick() {
document.bgColor = '#0000FF';
}
function Button4_onclick() {
document.fgColor = '#FF0000';
}
function Button5_onclick() {
document.fgColor = '#00FF00';
}
function Button6_onclick() {
document.fgColor = '#0000FF';
}
function Button7_onclick() {
document.bgColor = '#FFFFFF';
}
function Button8_onclick() {
document.fgColor = '#FFFFFF';
}
function Button9_onclick() {
document.fgColor = '#000000';
}
function Button10_onclick() {
document.bgColor = '#000000';
}
//-->
</script>
</head>
<body>
<p>Background color: <input id="Button1" type="button" value="Red" name="Button1" language="javascript" onclick="return Button1_onclick()">
<input id="Button2" type="button" value="Green" name="Button2" language="javascript" onclick="return Button2_onclick()">
<input id="Button3" type="button" value="Blue" name="Button3" language="javascript" onclick="return Button3_onclick()">
<input id="Button7" type="button" value="White" name="Button7" language="javascript" onclick="return Button7_onclick()">
<input id="Button10" type="button" value="Black" name="Button10" language="javascript" onclick="return Button10_onclick()"></p>
<p>Text color: <input id="Button4" type="button" value="Red" name="Button4" language="javascript" onclick="return Button4_onclick()">
<input id="Button5" type="button" value="Green" name="Button5" language="javascript" onclick="return Button5_onclick()">
<input id="Button6" type="button" value="Blue" name="Button6" language="javascript" onclick="return Button6_onclick()">
<input id="Button8" type="button" value="White" name="Button8" language="javascript" onclick="return Button8_onclick()">
<input id="Button9" type="button" value="Black" name="Button9" language="javascript" onclick="return Button9_onclick()"></p>
<p>Hey! Here are some text</p>
</body>
</html>